package com.example.design.shejimoshi.createMode.factoryMode.抽象工厂模式.factory;

/**
 * 工厂生成器，专门生产工厂
 */
public class FactoryProducer {
   public static AbstractFactory getFactory(String choice){
      if(choice.equalsIgnoreCase("SHAPE")){
         return new ShapeFactory();
      } else if(choice.equalsIgnoreCase("COLOR")){
         return new ColorFactory();
      }
      return null;
   }
}